package com.big.app.service.impl;

import com.big.app.dao.MoviedetailDao;
import com.big.app.dto.MovieDto;
import com.big.app.service.intf.MoviedetailService;
import com.big.app.vo1.R;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class MoviedetailServiceImpl implements MoviedetailService {
    @Resource
    private MoviedetailDao dao;

    @Override
    public R queryDetail(int id) {
        if (id > 0) {
            MovieDto movieDto = dao.selectDetail(id);

            return R.ok(movieDto);
        }
        return R.fail("网络异常！");
    }
}
